<?php

App::uses('AppController', 'Controller');
App::uses('Category',      'Model');

class KategorijeController extends AppController {
    
    public $uses = array('Category');
    
    public function index() {
        $categories = $this->Category->find('all');
        
        $this->set(compact('categories'));
    }
    
    public function view($slugName, $id) {
        $category = $this->Category->findById($id);
        
        $this->set(compact('category'));
    }
    
}